﻿<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:EasySL.Controls"
  xmlns:sys="clr-namespace:System;assembly=mscorlib"
  xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
  xmlns:localprimitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
  xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
  >
    <Style TargetType="local:ImageButton">
        <!-- key lines to enable the control -->
        <Setter Property="IsEnabled" Value="true" />
        <Setter Property="IsTabStop" Value="true" />
        <Setter Property="Cursor" Value="Hand" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ImageButton">
                    <Grid x:Name="Root" Margin="0" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
                        <Image x:Name="normalBlock" Source="{TemplateBinding NormalImage}"/>
                        <Image x:Name="hoverBlock" Source="{TemplateBinding HoverImage}" Opacity="0"/>
                        <Image x:Name="clickBlock" Source="{TemplateBinding ClickImage}" Opacity="0"/>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:0.5" To="MouseOver"/>
                                    <VisualTransition GeneratedDuration="00:00:0.1" To="Pressed"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="normalBlock" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.3"/>
                                        <DoubleAnimation Storyboard.TargetName="hoverBlock" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="normalBlock" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.3"/>
                                        <DoubleAnimation Storyboard.TargetName="hoverBlock" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.3"/>
                                        <DoubleAnimation Storyboard.TargetName="clickBlock" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.3"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                                <VisualState x:Name="Normal" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="local:DialogPanel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DialogPanel">
                    <Grid x:Name="root" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left">
                        <Grid.RenderTransform>
                            <ScaleTransform ScaleX="0" ScaleY="0"/>
                        </Grid.RenderTransform>
                        <Rectangle Fill="{TemplateBinding Background}" StrokeThickness="1" Stroke="#99bbe8" RadiusX="2" RadiusY="2"></Rectangle>
                        <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="*"></RowDefinition>
                            </Grid.RowDefinitions>
                            <Grid x:Name="Header" Cursor="Hand">
                                <Border Margin="2">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                            <GradientStop Color="#dae6f4" Offset="0"/>
                                            <GradientStop Color="#d4e2f4" Offset="0.5"/>
                                            <GradientStop Color="#abc7ec" Offset="0.51"/>
                                            <GradientStop Color="#bcd2ef" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                                <Border Background="#99bbe8" Height="1" VerticalAlignment="Bottom"></Border>
                                <TextBlock Margin="5"  
                                           Text="{TemplateBinding Title}" 
                                           VerticalAlignment="Center"
                                           
                                           FontSize="13"
                                           >
                                </TextBlock>
                                <local:ImageButton x:Name="close" Width="13" Height="12" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="7"
                                                       NormalImage="/EasySL.Controls;component/Images/ico_close.png"
                                                       HoverImage="/EasySL.Controls;component/Images/ico_close_hover.png"
                                                       ClickImage="/EasySL.Controls;component/Images/ico_close_click.png"/>
                            </Grid>
                            <Border Background="#dfe8f6" Margin="1" Grid.Row="1" CornerRadius="2">
                                <ContentPresenter x:Name="ContentPresenterElement"  Margin="2"
                                              Content="{TemplateBinding Content}" 
                                              ContentTemplate="{TemplateBinding ContentTemplate}"/>
                            </Border>

                        </Grid>
                        <Grid.Resources>
                            <Storyboard x:Name="storyboard">
                                <DoubleAnimation Storyboard.TargetName="root" Storyboard.TargetProperty="(UIElement.RenderTransform).ScaleTransform.ScaleX" From="0.3" To="1" Duration="0:0:0.3"/>
                                <DoubleAnimation Storyboard.TargetName="root" Storyboard.TargetProperty="(UIElement.RenderTransform).ScaleTransform.ScaleY" From="0.3" To="1" Duration="0:0:0.3"/>
                                <DoubleAnimation Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5"/>
                            </Storyboard>
                        </Grid.Resources>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style TargetType="local:VisualPager">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:VisualPager">
                    <Grid x:Name="root" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Cursor="Hand">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="10"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="10"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="10"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="10"/>
                            <ColumnDefinition Width="auto"/>
                            <ColumnDefinition Width="10"/>
                            <ColumnDefinition Width="auto"/>
                        </Grid.ColumnDefinitions>
                        <local:ImageButton Grid.Column="0" x:Name="first" Width="15" Height="21"
                                                       NormalImage="/EasySL.Controls;component/Images/arrow_Left_normal2.png"
                                                       HoverImage="/EasySL.Controls;component/Images/arrow_Left_hover2.png"
                                                       ClickImage="/EasySL.Controls;component/Images/arrow_Left_click2.png"/>
                        <local:ImageButton Grid.Column="2" x:Name="pre" Width="15" Height="21"
                                                       NormalImage="/EasySL.Controls;component/Images/arrow_Left_normal.png"
                                                       HoverImage="/EasySL.Controls;component/Images/arrow_Left_hover.png"
                                                       ClickImage="/EasySL.Controls;component/Images/arrow_Left_click.png"/>
                        <local:ImageButton Grid.Column="6" x:Name="next" Width="15" Height="21"
                                                       NormalImage="/EasySL.Controls;component/Images/arrow_Right_normal.png"
                                                       HoverImage="/EasySL.Controls;component/Images/arrow_Right_hover.png"
                                                       ClickImage="/EasySL.Controls;component/Images/arrow_Right_click.png"/>
                        <local:ImageButton Grid.Column="8" x:Name="last" Width="15" Height="21"
                                                       NormalImage="/EasySL.Controls;component/Images/arrow_Right_normal2.png"
                                                       HoverImage="/EasySL.Controls;component/Images/arrow_Right_hover2.png"
                                                       ClickImage="/EasySL.Controls;component/Images/arrow_Right_click2.png"/>
                        <TextBlock x:Name="position" Grid.Column="10" FontSize="13"/>
                        <Canvas Grid.Column="4" x:Name="numbersCanvas" VerticalAlignment="Top">
                            <Border x:Name="block" BorderThickness="1" Background="White" Margin="0,-2,0,0"/>
                            <StackPanel x:Name="numbersPanel" Orientation="Horizontal"/>
                            <Canvas.Resources>
                                <Storyboard x:Name="storyboard">
                                    <DoubleAnimation Storyboard.TargetName="numbersPanel" Storyboard.TargetProperty="(Canvas.Left)" Duration="0:0:0.4"/>
                                    <DoubleAnimation Storyboard.TargetName="block" Storyboard.TargetProperty="(Canvas.Left)" Duration="0:0:0.6"/>
                                    <DoubleAnimation Storyboard.TargetName="block" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:1"/>
                                    <DoubleAnimation Storyboard.TargetName="numbersPanel" Storyboard.TargetProperty="Opacity" Duration="0:0:0.6"/>
                                </Storyboard>
                            </Canvas.Resources>
                        </Canvas>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:Activity">
        <Setter Property="ActiveContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Grid Margin="0,0,0,0" Width="150" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Visible" RenderTransformOrigin="0.5,0.5">
                        <Grid.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Grid.RenderTransform>
                        <Border Background="#FFFFFFFF" BorderThickness="1,1,1,1" CornerRadius="2,2,2,2" Height="51" Margin="0,2,0,0" VerticalAlignment="Top">
                            <Border.BorderBrush>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                    <GradientStop Color="#FF718597" Offset="0.375"/>
                                    <GradientStop Color="#FF617584" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                            <Border CornerRadius="1.5,1.5,1.5,1.5" Margin="1,1,1,1">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFB8B8B8" Offset="0.996"/>
                                        <GradientStop Color="#FFF6F8F9" Offset="0.02"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <StackPanel>
                                    <Grid>
                                        <TextBlock HorizontalAlignment="Stretch" Margin="8,4,8,4" VerticalAlignment="Center" FontWeight="Normal" Text="{Binding}" TextWrapping="Wrap"/>
                                        <Image Source="/EasySL.Controls;component/Images/ico_close.png" Stretch="None" HorizontalAlignment="Right" />
                                    </Grid>
                                    <ProgressBar Height="15" Margin="8,0,8,0" IsIndeterminate="True"/>
                                </StackPanel>
                            </Border>
                        </Border>
                    </Grid>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="DisplayAfter" Value="00:00:00.05" />
        <Setter Property="MinDisplayTime" Value="00:00:00.75" />
        <Setter Property="AutoBind" Value="True" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:Activity">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ActivityDisplay">
                                <VisualState x:Name="Hidden">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter1" Storyboard.TargetProperty="(UIElement.IsHitTestVisible)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentControl" Storyboard.TargetProperty="(Control.IsEnabled)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>True</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Displaying">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter1" Storyboard.TargetProperty="(UIElement.IsHitTestVisible)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>False</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="contentControl" Storyboard.TargetProperty="(Control.IsEnabled)" Duration="00:00:00.0010000">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <sys:Boolean>False</sys:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                            <EasingColorKeyFrame KeyTime="00:00:00" Value="#5AFFFFFF"/>
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentControl x:Name="contentControl"
										VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
										HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}">
                            <ContentPresenter x:Name="contentPresenter1" Canvas.ZIndex="0" Content="{TemplateBinding Content}"/>
                        </ContentControl>
                        <Rectangle x:Name="rectangle" Fill="#32FFFFFF" Canvas.ZIndex="1" Visibility="Collapsed" />
                        <ContentPresenter x:Name="contentPresenter"
                                          Canvas.ZIndex="2" Visibility="Collapsed"
                                          Content="{TemplateBinding Message}"
                                          ContentTemplate="{TemplateBinding ActiveContentTemplate}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    
    <!--  ExDataGrid Beginning  -->
    <Style TargetType="local:ExCommandPanel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ExCommandPanel">
                    <Grid>
                        <StackPanel x:Name="statePanel" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,5,0"/>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                            <StackPanel x:Name="commandPanel" Orientation="Horizontal">
                                <StackPanel.RenderTransform>
                                    <TransformGroup>
                                        <TranslateTransform x:Name="move"/>
                                    </TransformGroup>
                                </StackPanel.RenderTransform>
                                <StackPanel.Resources>
                                    <Storyboard x:Name="show">
                                        <DoubleAnimation Storyboard.TargetName="move" Storyboard.TargetProperty="X" From="2" To="-2"  Duration="0:0:0.2" />
                                        <DoubleAnimation Storyboard.TargetName="commandPanel" Storyboard.TargetProperty="(Opacity)" From="0" To="1"  Duration="0:0:0.3" />
                                    </Storyboard>
                                    <Storyboard x:Name="hide">
                                        <DoubleAnimation Storyboard.TargetName="move" Storyboard.TargetProperty="X" From="-2" To="2"  Duration="0:0:0.1" />
                                        <DoubleAnimation Storyboard.TargetName="commandPanel" Storyboard.TargetProperty="(Opacity)" From="1" To="0"  Duration="0:0:0.3" />
                                    </Storyboard>
                                    <Storyboard x:Name="showMenu">
                                        <DoubleAnimation Storyboard.TargetProperty="Height" From="0" Duration="0:0:0.5" />
                                    </Storyboard>
                                </StackPanel.Resources>
                            </StackPanel>
                        </StackPanel>
                        <StackPanel x:Name="expandPanel" Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ExDragItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ExDragItem">
                    <Border BorderBrush="Gray" BorderThickness="1" Padding="3" Background="#F5F5F5">
                        <ContentPresenter x:Name="content"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ExFilterPanelGrid">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ExFilterPanelGrid">
                    <Grid Margin="10">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto"/>
                            <RowDefinition/>
                            <RowDefinition Height="auto"/>
                        </Grid.RowDefinitions>
                        <ContentPresenter Name="propertyName" Margin="15,5,10,5"/>
                        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,0,10,0">
                            <TextBlock Name="type" VerticalAlignment="Center" Margin="5"/>
                            <TextBox Name="value1" Width="50" Margin="5" MinWidth="100"/>
                            <TextBox Name="value2" Width="50" Margin="5" MinWidth="100"/>
                        </StackPanel>
                        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="5">
                            <Button Name="submit" Content="Submit" Margin="10"/>
                            <Button Name="cancel" Content="Cancel" Margin="10"/>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ExFilterMenu">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ExFilterMenu">
                    <Grid Width="165" x:Name="menuContent" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Top" HorizontalAlignment="Left">
                        <Grid.Resources>
                            <Style x:Key="menuItemStyle" TargetType="Button">
                                <Setter Property="Background" Value="#FF1F3B53"/>
                                <Setter Property="Foreground" Value="#FF000000"/>
                                <Setter Property="Padding" Value="7,3,3,3"/>
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                            <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                            <GradientStop Color="#FF718597" Offset="0.375"/>
                                            <GradientStop Color="#FF617584" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid Background="#00000000">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualStateGroup.Transitions>
                                                            <VisualTransition GeneratedDuration="00:00:00" To="MouseOver"/>
                                                            <VisualTransition GeneratedDuration="00:00:00" To="Pressed"/>
                                                            <VisualTransition GeneratedDuration="00:00:00" To="Disabled"/>
                                                        </VisualStateGroup.Transitions>
                                                        <VisualState x:Name="Normal">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Collapsed</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Visible</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Visibility)">
                                                                    <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                                        <DiscreteObjectKeyFrame.Value>
                                                                            <Visibility>Visible</Visibility>
                                                                        </DiscreteObjectKeyFrame.Value>
                                                                    </DiscreteObjectKeyFrame>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.3"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused">
                                                            <Storyboard/>
                                                        </VisualState>
                                                        <VisualState x:Name="Unfocused"/>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Rectangle Margin="3,0,3,0" x:Name="Background" Visibility="Collapsed" Fill="#FFAFC9DD" Stroke="{x:Null}"/>
                                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                <Setter Property="FontFamily" Value="Verdana"/>
                                <Setter Property="FontSize" Value="12"/>
                            </Style>
                        </Grid.Resources>
                        <Grid.RenderTransform>
                            <TransformGroup>
                                <TranslateTransform x:Name="PosXlt"/>
                            </TransformGroup>
                        </Grid.RenderTransform>
                        <Rectangle Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" RadiusX="3" RadiusY="3">
                            <Rectangle.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                    <GradientStop Color="#FF617584" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Stroke>
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFFDFDFD" Offset="0"/>
                                    <GradientStop Color="#FFE3E0DF" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <StackPanel x:Name="menu" Background="{x:Null}" Margin="0,6,0,6"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Name="dropLocationIndicatorStyle" TargetType="ContentControl">
        <Setter Property="Background" Value="#FFF5F5F5"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid Width="13">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.Triggers>
                            <EventTrigger RoutedEvent="Grid.Loaded">
                                <EventTrigger.Actions>
                                    <BeginStoryboard>
                                        <BeginStoryboard.Storyboard>
                                            <Storyboard RepeatBehavior="Forever">
                                                <DoubleAnimation Storyboard.TargetName="Path3" Storyboard.TargetProperty="(Canvas.Top)" From="-11" To="-15" AutoReverse="True" Duration="00:00:00.75" />
                                                <DoubleAnimation Storyboard.TargetName="Path4" Storyboard.TargetProperty="(Canvas.Top)" From="-10" To="-14" AutoReverse="True" Duration="00:00:00.75" />
                                                <DoubleAnimation Storyboard.TargetName="Path1" Storyboard.TargetProperty="(Canvas.Top)" From="10" To="14" AutoReverse="True" Duration="00:00:00.75" />
                                                <DoubleAnimation Storyboard.TargetName="Path2" Storyboard.TargetProperty="(Canvas.Top)" From="11" To="15" AutoReverse="True" Duration="00:00:00.75" />
                                            </Storyboard>
                                        </BeginStoryboard.Storyboard>
                                    </BeginStoryboard>
                                </EventTrigger.Actions>
                            </EventTrigger>
                        </Grid.Triggers>
                        <Rectangle Grid.RowSpan="3" Fill="Black" Width="2" Height="{TemplateBinding Height}">
                            <Rectangle.RenderTransform>
                                <TranslateTransform X="-6.5"/>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                        <Canvas x:Name="DownArrow" Width="13" Height="11" Grid.Row="0">
                            <Path x:Name="Path3" Width="13" Height="11" Canvas.Left="-6" Canvas.Top="0" Stretch="Fill" Fill="Gray" Data="F1 M 6,11L 7,11L 13,5L 12.9995,4L 10,4L 10,0L 3,0L 3,4L 0,4L 0,5L 6,11 Z "/>
                            <Path x:Name="Path4" Width="11" Height="9" Canvas.Left="-5" Canvas.Top="1" Stretch="Fill" Fill="{TemplateBinding Background}" Data="F1 M 6,10L 7,10L 12,5L 9,5L 9,1L 4,1L 4,5L 1,5L 6,10 Z "/>
                        </Canvas>
                        <Canvas x:Name="UpArrow" Width="13" Height="11" Grid.Row="2">
                            <Path x:Name="Path1" Width="13" Height="11" Canvas.Left="-6" Canvas.Top="0" Stretch="Fill" Fill="Gray" Data="F1 M 7,0L 6,0L 0,6L 0.000488281,7L 3,7L 3,11L 10,11L 10,7L 13,7L 13,6L 7,0 Z "/>
                            <Path x:Name="Path2" Width="11" Height="9" Canvas.Left="-5" Canvas.Top="1" Stretch="Fill" Fill="{TemplateBinding Background}" Data="F1 M 7,1L 6,1L 1,6L 4,6L 4,10L 9,10L 9,6L 12,6L 7,1 Z "/>
                        </Canvas>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Name="ExDataGridColumnHeader" TargetType="localprimitives:DataGridColumnHeader">
        <Setter Property="Foreground" Value="#FFFFFFFF" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="SeparatorBrush" Value="White" />
        <Setter Property="Padding" Value="4,7,4,10" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localprimitives:DataGridColumnHeader">
                    <Grid Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" To="#6499d4"/>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" To="#578bc5"/>
                                        <!--<ColorAnimation Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Fill).(GradientStops)[3].Color" To="#7FFFFFFF"/>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" To="#CCFFFFFF"/>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" To="#F2FFFFFF"/>-->
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <!--<ColorAnimation Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" To="#D8FFFFFF"/>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" To="#C6FFFFFF"/>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" To="#8CFFFFFF"/>
                                        <ColorAnimation Duration="0" Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Fill).(GradientStops)[3].Color" To="#3FFFFFFF"/>-->
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SortStates">
                                <VisualState x:Name="Unsorted" />
                                <VisualState x:Name="SortAscending">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="SortIcon" Storyboard.TargetProperty="Opacity" Duration="0" To="1.0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SortDescending">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="SortIcon" Storyboard.TargetProperty="Opacity" Duration="0" To="1.0"/>
                                        <DoubleAnimation Storyboard.TargetName="SortIcon" Storyboard.TargetProperty="(RenderTransform).ScaleY" Duration="0" To="-.9"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Grid.ColumnSpan="2">
                            <Rectangle.Fill>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Color="#90b9e6" Offset="0" />
                                    <GradientStop Color="#6a9dd9" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <Rectangle x:Name="BackgroundGradient" Visibility="Collapsed" Stretch="Fill" Grid.ColumnSpan="2" >
                            <Rectangle.Fill>
                                <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                    <GradientStop Color="#FCFFFFFF" Offset="0.015" />
                                    <GradientStop Color="#F7FFFFFF" Offset="0.375" />
                                    <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                    <GradientStop Color="#D1FFFFFF" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>

                        <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <ContentPresenter Content="{TemplateBinding Content}"/>

                            <Path Grid.Column="1" Name="SortIcon" Fill="#FF444444" RenderTransformOrigin=".5,.5" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0" Stretch="Uniform" Width="8" Margin="4,0,0,0" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                <Path.RenderTransform>
                                    <ScaleTransform ScaleX=".9" ScaleY=".9" />
                                </Path.RenderTransform>
                            </Path>
                        </Grid>

                        <Rectangle Name="VerticalSeparator" Grid.Column="1" Width="1" VerticalAlignment="Stretch" Fill="{TemplateBinding SeparatorBrush}" Visibility="{TemplateBinding SeparatorVisibility}" />

                        <local:ExCommandPanel HorizontalAlignment="Right" Grid.Column="0" Content="{TemplateBinding Content}"/>
                        <local:ExCheckBox Content="{TemplateBinding Content}" Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="2"/>
                        <local:ExDropLocation Style="{StaticResource dropLocationIndicatorStyle}" Visibility="Collapsed" HorizontalAlignment="Right" Content="{TemplateBinding Content}">
                            <local:ExDropLocation.RenderTransform>
                                <TranslateTransform X="13"/>
                            </local:ExDropLocation.RenderTransform>
                        </local:ExDropLocation>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Name="ExDataGridRow" TargetType="data:DataGridRow">
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="data:DataGridRow">
                    <localprimitives:DataGridFrozenGrid Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="NormalAlternatingRow">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To=".5"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalSelected">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverSelected">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="UnfocusedSelected">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                        <!--<ColorAnimation Duration="0" Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Fill).Color" To="#FFE1E7EC"/>-->
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="Invalid">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Storyboard.TargetName="InvalidVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>

                        <Grid.Resources>
                            <Storyboard x:Key="DetailsVisibleTransition">
                                <DoubleAnimation Storyboard.TargetName="DetailsPresenter" Storyboard.TargetProperty="ContentHeight" Duration="00:00:0.1" />
                            </Storyboard>
                        </Grid.Resources>

                        <Rectangle x:Name="BackgroundRectangle" Grid.RowSpan="2" Grid.ColumnSpan="2" Opacity="0" Margin="1,1,1,2" RadiusX="2" RadiusY="2">
                            <Rectangle.Fill>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                    <GradientStop Color="#ecf4fe" Offset="0" />
                                    <GradientStop Color="#ecf4fe" Offset="0.5" />
                                    <GradientStop Color="#ddecfe" Offset="0.51" />
                                    <GradientStop Color="#ddecfe" Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle x:Name="InvalidVisualElement" Grid.RowSpan="2" Grid.ColumnSpan="2" Opacity="0" Fill="#FFF7D8DB"/>

                        <localprimitives:DataGridRowHeader Grid.RowSpan="3" Name="RowHeader" localprimitives:DataGridFrozenGrid.IsFrozen="True" />
                        <localprimitives:DataGridCellsPresenter Grid.Column="1" Name="CellsPresenter" localprimitives:DataGridFrozenGrid.IsFrozen="True" VerticalAlignment="Center"/>
                        <localprimitives:DataGridDetailsPresenter Grid.Row="1" Grid.Column="1" Name="DetailsPresenter" />
                        <Rectangle Grid.Row="2" Grid.Column="1" Name="BottomGridLine" HorizontalAlignment="Stretch" Height="1"/>
                        <Rectangle Grid.Row="1" Grid.ColumnSpan="2" Fill="#d3d3d3" Height="1"/>
                        <Rectangle Grid.RowSpan="3" Grid.Column="0" HorizontalAlignment="Left" Fill="#d3d3d3" Width="0"/>
                    </localprimitives:DataGridFrozenGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Name="ExDataGridCell" TargetType="data:DataGridCell">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="data:DataGridCell">
                    <Grid Name="Root" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CurrentStates">
                                <VisualState x:Name="Regular" />
                                <VisualState x:Name="Current">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="Invalid">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="InvalidVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                        <ColorAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="(Fill).Color" Duration="0" To="#FFFFFFFF"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <Rectangle Name="FocusVisual" Stroke="#dbeafb" StrokeThickness="2" Fill="#ffffff" HorizontalAlignment="Stretch" RadiusX="3" RadiusY="3" 
                                   VerticalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" Margin="0"/>

                        <ContentPresenter
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}" />

                        <Rectangle x:Name="InvalidVisualElement" IsHitTestVisible="False" StrokeThickness="1" Stroke="#FFDC000C" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0"/>

                        <Rectangle Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ExDataGrid">
        <Setter Property="ColumnHeaderStyle" Value="{StaticResource ExDataGridColumnHeader}" />
        <Setter Property="RowStyle" Value="{StaticResource ExDataGridRow}" />
        <Setter Property="CellStyle" Value="{StaticResource ExDataGridCell}" />
        <Setter Property="RowHeight" Value="22" />
        <Setter Property="RowBackground" Value="#f3f3f3" />
        <Setter Property="AlternatingRowBackground" Value="#ffffff" />
        <Setter Property="Background" Value="#FFFFFFFF" />
        <Setter Property="HeadersVisibility" Value="Column" />
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
        <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
        <Setter Property="SelectionMode" Value="Extended" />
        <Setter Property="CanUserReorderColumns" Value="True" />
        <Setter Property="CanUserResizeColumns" Value="True" />
        <Setter Property="CanUserSortColumns" Value="True" />
        <Setter Property="AutoGenerateColumns" Value="True" />
        <Setter Property="RowDetailsVisibilityMode" Value="VisibleWhenSelected" />
        <Setter Property="BorderBrush" Value="#6e6e6e"/>
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="DragIndicatorStyle">
            <Setter.Value>
                <!-- TODO: Change the TargetType to Control when the fix Jolt bugs 18719 is verified -->
                <Style TargetType="ContentControl">
                    <Setter Property="Foreground" Value="#7FFFFFFF" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <!-- TODO: Change the TargetType to Control when the fix Jolt bugs 18719 is verified -->
                            <ControlTemplate TargetType="ContentControl">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="SortStates">
                                            <VisualState x:Name="Unsorted" />
                                            <VisualState x:Name="SortAscending">
                                                <Storyboard>
                                                    <DoubleAnimation Storyboard.TargetName="SortIcon" Storyboard.TargetProperty="Opacity" Duration="0" To="1.0"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="SortDescending">
                                                <Storyboard>
                                                    <DoubleAnimation Storyboard.TargetName="SortIcon" Storyboard.TargetProperty="Opacity" Duration="0" To="1.0"/>
                                                    <DoubleAnimation Storyboard.TargetName="SortIcon" Storyboard.TargetProperty="(RenderTransform).ScaleY" Duration="0" To="-.9"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>

                                    <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Fill="#66808080" Grid.ColumnSpan="2" />

                                    <Rectangle x:Name="BackgroundGradient" Stretch="Fill" Grid.ColumnSpan="2" Opacity="0" >
                                        <Rectangle.Fill>
                                            <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.015" />
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                <GradientStop Color="#C6FFFFFF" Offset="1" />
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>

                                    <Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition/>
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <ContentPresenter Content="{TemplateBinding Content}"/>

                                        <Path Grid.Column="1" Name="SortIcon" Fill="#7FFFFFFF" RenderTransformOrigin=".5,.5" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0" Stretch="Uniform" Width="8" Margin="4,0,0,0" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                            <Path.RenderTransform>
                                                <ScaleTransform ScaleX=".9" ScaleY=".9" />
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="DropLocationIndicatorStyle" Value="{StaticResource dropLocationIndicatorStyle}"/>
        <Setter Property="GridLinesVisibility" Value="Vertical" />
        <Setter Property="HorizontalGridLinesBrush" Value="#FFd3d3d3" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="VerticalGridLinesBrush" Value="#f5f5f5" />
        <Setter Property="Desc" Value="Please add description" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ExDataGrid">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Popup Name="filterMenuPopup" IsOpen="True" VerticalOffset="3000">
                            <local:ExFilterMenu x:Name="exFilterMenu"/>
                        </Popup>
                        <ItemsControl Name="rowNumbers" Margin="0,32,0,0" HorizontalAlignment="Left">
                            <ItemsControl.RenderTransform>
                                <TranslateTransform X="-30"/>
                            </ItemsControl.RenderTransform>
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <Border Padding="2" Height="23" MinWidth="25" CornerRadius="3" BorderThickness="1" BorderBrush="White" Background="Transparent">
                                        <TextBlock Text="{Binding}" HorizontalAlignment="Right" Foreground="Gray"/>
                                    </Border>
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ItemsControl>
                        <ContentPresenter Grid.Row="1" Content="{TemplateBinding Desc}"/>
                        <Border Padding="1" Grid.Column="1" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="2">
                            <Grid Name="Root" Background="{TemplateBinding Background}">
                                <Grid.Resources>
                                    <!--Start: TopLeftHeaderTemplate-->
                                    <ControlTemplate x:Key="TopLeftHeaderTemplate" TargetType="localprimitives:DataGridColumnHeader">
                                        <Grid Name="Root">
                                            <Grid.RowDefinitions>
                                                <RowDefinition/>
                                                <RowDefinition/>
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <Border BorderThickness="0,0,1,0" BorderBrush="#FFC9CACA" Background="#FF1F3B53" Grid.RowSpan="2">
                                                <Rectangle Stretch="Fill" StrokeThickness="1">
                                                    <Rectangle.Fill>
                                                        <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                            <GradientStop Color="#FCFFFFFF" Offset="0.015" />
                                                            <GradientStop Color="#F7FFFFFF" Offset="0.375" />
                                                            <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                            <GradientStop Color="#D1FFFFFF" Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Rectangle.Fill>
                                                </Rectangle>
                                            </Border>
                                            <Rectangle VerticalAlignment="Bottom" Width="Auto" StrokeThickness="1" Height="1" Fill="#FFDBDCDC" Grid.RowSpan="2"/>
                                        </Grid>
                                    </ControlTemplate>
                                    <!--End: TopLeftHeaderTemplate-->

                                    <!--Start: TopRightHeaderTemplate-->
                                    <ControlTemplate x:Key="TopRightHeaderTemplate" TargetType="localprimitives:DataGridColumnHeader">
                                        <Grid Name="RootElement">
                                            <Grid.RowDefinitions>
                                                <RowDefinition/>
                                                <RowDefinition/>
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                            <Border BorderBrush="#FFFFFF" Background="#FF1F3B53" Grid.RowSpan="2">
                                                <Rectangle Stretch="Fill">
                                                    <Rectangle.Fill>
                                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                                            <GradientStop Color="#90b9e6" Offset="0" />
                                                            <GradientStop Color="#6a9dd9" Offset="1" />
                                                        </LinearGradientBrush>
                                                    </Rectangle.Fill>
                                                </Rectangle>
                                            </Border>
                                        </Grid>
                                    </ControlTemplate>
                                    <!--End: TopRightHeaderTemplate-->
                                </Grid.Resources>

                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition/>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition/>
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <localprimitives:DataGridColumnHeader Name="TopLeftCornerHeader" Template="{StaticResource TopLeftHeaderTemplate}" Width="22"/>
                                <localprimitives:DataGridColumnHeadersPresenter Name="ColumnHeadersPresenter" Grid.Column="1"/>
                                <localprimitives:DataGridColumnHeader Name="TopRightCornerHeader" Grid.Column="2" Template="{StaticResource TopRightHeaderTemplate}" />
                                <Border Name="ColumnHeadersAndRowsSeparator" Grid.ColumnSpan="3" VerticalAlignment="Bottom" Width="Auto" BorderThickness="0,1,0,1"  BorderBrush="White" Height="6" Background="#6e6e6e"/>

                                <localprimitives:DataGridRowsPresenter Name="RowsPresenter" Grid.ColumnSpan="2" Grid.Row="1" />
                                <Rectangle Name="BottomRightCorner" Fill="#6e6e6e" Grid.Column="2" Grid.Row="2" />
                                <Rectangle Name="BottomLeftCorner" Fill="#6e6e6e" Grid.Row="2" Grid.ColumnSpan="2" />
                                <ScrollBar Visibility="Collapsed"  Name="VerticalScrollbar" Orientation="Vertical" Grid.Column="2" Grid.Row="1" Margin="0,-1,0,-1"/>
                                <local:ExScrollBar Grid.Column="2" Grid.Row="1" Margin="0,-1,0,-1"/>

                                <Grid Grid.Column="1" Grid.Row="2">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>

                                    <ScrollViewer x:Name="summaryRowViewer" Grid.Column="1" Height="28" Foreground="White" VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden" BorderThickness="0,1,0,0" BorderBrush="#ffffff">
                                        <Grid>
                                            <TextBlock Margin="3">Sum:</TextBlock>
                                            <StackPanel  Name="summaryRowPanel" Orientation="Horizontal" HorizontalAlignment="Left">
                                            </StackPanel>
                                        </Grid>
                                    </ScrollViewer>

                                    <Rectangle Grid.Row="1" Name="FrozenColumnScrollBarSpacer" />
                                    <ScrollBar Grid.Row="1" Name="HorizontalScrollbar"  Grid.Column="1" Orientation="Horizontal" Height="18" Margin="-1,0,-1,-1"/>
                                </Grid>

                                <dataInput:ValidationSummary Name="ValidationSummary" Filter="ObjectErrors" Grid.Row="3" Grid.ColumnSpan="3" MaxHeight="90"/>
                            </Grid>
                        </Border>
                        <Border x:Name="DisabledVisualElement" IsHitTestVisible="False" Height="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" CornerRadius="2" Background="#8CFFFFFF" Opacity="0"/>
                        <Border x:Name="currentValuePanel" Visibility="Collapsed" Height="30" Width="150" Opacity="0.9" Grid.RowSpan="2" Grid.ColumnSpan="2" Background="White" BorderBrush="#FFACACAC" BorderThickness="1" CornerRadius="3">
                            <Grid>
                                <Rectangle RadiusX="5" RadiusY="5" Margin="2">
                                    <Rectangle.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFFFFFFF"/>
                                            <GradientStop Color="#FFE9E9E9" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Rectangle.Fill>
                                </Rectangle>
                                <TextBlock x:Name="currentValue" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="data:DataGridRowGroupHeader">
        <Setter Property="Cursor" Value="Arrow" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="Background" Value="#FFE4E8EA" />
        <Setter Property="Height" Value="20"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="data:DataGridRowGroupHeader">
                    <localprimitives:DataGridFrozenGrid Name="Root" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CurrentStates">
                                <VisualState x:Name="Regular"/>
                                <VisualState x:Name="Current">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="FocusVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <localprimitives:DataGridFrozenGrid.Resources>
                            <ControlTemplate x:Key="ToggleButtonTemplate" TargetType="ToggleButton">
                                <Grid Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <ColorAnimation Storyboard.TargetName="CollapsedArrow" Storyboard.TargetProperty="(Stroke).Color" Duration="0" To="#FF6DBDD1"/>
                                                    <ColorAnimation Storyboard.TargetName="ExpandedArrow" Storyboard.TargetProperty="(Fill).Color" Duration="0" To="#FF6DBDD1"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <ColorAnimation Storyboard.TargetName="CollapsedArrow" Storyboard.TargetProperty="(Stroke).Color" Duration="0" To="#FF6DBDD1"/>
                                                    <ColorAnimation Storyboard.TargetName="ExpandedArrow" Storyboard.TargetProperty="(Fill).Color" Duration="0" To="#FF6DBDD1"/>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="CollapsedArrow" Storyboard.TargetProperty="Opacity" To=".5"/>
                                                    <DoubleAnimation Duration="0" Storyboard.TargetName="ExpandedArrow" Storyboard.TargetProperty="Opacity" To=".5"/>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="CheckStates">
                                            <VisualState x:Name="Checked" />
                                            <VisualState x:Name="Unchecked">
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="CollapsedArrow" Storyboard.TargetProperty="Visibility">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                    <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandedArrow" Storyboard.TargetProperty="Visibility">
                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>

                                    <Path Stretch="Uniform" Data="F1 M 0,0 L 0,1 L .6,.5 L 0,0 Z" Width="5" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="CollapsedArrow" Visibility="Collapsed" Stroke="#FF414345"/>
                                    <Path Stretch="Uniform" Data="F1 M 0,1 L 1,1 L 1,0 L 0,1 Z" Width="6" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="ExpandedArrow" Fill="#FF414345"/>
                                </Grid>
                            </ControlTemplate>
                        </localprimitives:DataGridFrozenGrid.Resources>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <Rectangle Grid.Column="1" Grid.ColumnSpan="5" Fill="#FFFFFFFF" Height="1"/>
                        <Rectangle Grid.Column="1" Grid.Row="1" Name="IndentSpacer" />
                        <ToggleButton Grid.Column="2" Grid.Row="1" Name="ExpanderButton" Height="15" Width="15" Template="{StaticResource ToggleButtonTemplate}" Margin="2,0,0,0"/>

                        <StackPanel Grid.Column="3" Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,1,0,1">
                            <TextBlock x:Name="PropertyNameElement" Margin="4,0,0,0" Visibility="{TemplateBinding PropertyNameVisibility}"/>
                            <TextBlock Margin="4,0,0,0" Text="{Binding Name}" />
                            <TextBlock x:Name="ItemCountElement" Margin="4,0,0,0" Visibility="{TemplateBinding ItemCountVisibility}"/>
                        </StackPanel>

                        <Rectangle Grid.Column="1" Grid.ColumnSpan="5" Fill="#FFD3D3D3" Height="1" Grid.Row="2"/>
                        <Rectangle Name="FocusVisual" Grid.Column="1" Grid.ColumnSpan="4" Grid.RowSpan="3" Stroke="#FF6DBDD1" StrokeThickness="1" HorizontalAlignment="Stretch" 
                                   VerticalAlignment="Stretch" IsHitTestVisible="false" Opacity="0" />
                        <localprimitives:DataGridRowHeader Name="RowHeader" Grid.RowSpan="3" localprimitives:DataGridFrozenGrid.IsFrozen="True"/>

                    </localprimitives:DataGridFrozenGrid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="localprimitives:DataGridRowHeader">
        <Setter Property="Background" Value="#6e6e6e" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="SeparatorBrush" Value="#FFFFFFFF" />
        <Setter Property="SeparatorVisibility" Value="Collapsed"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localprimitives:DataGridRowHeader">
                    <Grid Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Fill).Color" Duration="0" To="#99D5EAF1"/>
                                        <DoubleAnimation Storyboard.TargetName="CurrentRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                        <DoubleAnimation Storyboard.TargetName="EditingRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOverCurrentRowSelected">
                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Fill).Color" Duration="0" To="#FFD5EAF1"/>
                                        <DoubleAnimation Storyboard.TargetName="CurrentRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                        <DoubleAnimation Storyboard.TargetName="EditingRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalCurrentRow">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="CurrentRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                        <DoubleAnimation Storyboard.TargetName="EditingRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalSelected">
                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Fill).Color" Duration="0" To="#FFD5EAF1"/>
                                        <DoubleAnimation Storyboard.TargetName="CurrentRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                        <DoubleAnimation Storyboard.TargetName="EditingRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NormalEditingRow">
                                    <Storyboard>
                                        <ColorAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="(Fill).Color" Duration="0" To="#FFD5EAF1"/>
                                        <DoubleAnimation Storyboard.TargetName="CurrentRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                        <DoubleAnimation Storyboard.TargetName="EditingRowGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="RowValid"/>
                                <VisualState x:Name="RowInvalid">
                                    <Storyboard>
                                        <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="0"/>
                                        <DoubleAnimation Storyboard.TargetName="RowInvalidVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1"/>
                                        <ColorAnimation Storyboard.TargetName="CurrentRowGlyph" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Duration="0" To="#FFDC000C"/>
                                        <ColorAnimation Storyboard.TargetName="CurrentRowGlyph" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Duration="0" To="#FFDC000C"/>
                                        <ColorAnimation Storyboard.TargetName="CurrentRowGlyph" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Duration="0" To="#FFDC000C"/>
                                        <ColorAnimation Storyboard.TargetName="EditingRowGlyph" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Duration="0" To="#FFDC000C"/>
                                        <ColorAnimation Storyboard.TargetName="EditingRowGlyph" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Duration="0" To="#FFDC000C"/>
                                        <ColorAnimation Storyboard.TargetName="EditingRowGlyph" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Duration="0" To="#FFDC000C"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>

                        <Border BorderBrush="#FFFFFFFF" BorderThickness="1,0,1,0" Grid.RowSpan="3" Grid.ColumnSpan="2">
                            <Grid Background="{TemplateBinding Background}">
                                <Rectangle x:Name="RowInvalidVisualElement" Stretch="Fill" Grid.RowSpan="3" Grid.ColumnSpan="2" Fill="#FFF7D8DB" Opacity="0" />
                                <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Grid.RowSpan="3" Grid.ColumnSpan="2" Fill="Transparent" />
                            </Grid>
                        </Border>
                        <Rectangle Name="HorizontalSeparator" Grid.ColumnSpan="2" Grid.Row="2" Height="1" Margin="1,0,1,0" HorizontalAlignment="Stretch" Fill="{TemplateBinding SeparatorBrush}" Visibility="{TemplateBinding SeparatorVisibility}" />

                        <ContentPresenter Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1" Grid.RowSpan="2" />

                        <Path Name="CurrentRowGlyph" VerticalAlignment="Center" HorizontalAlignment="Center" Width="6" Height="10"  Margin="8,0,8,0" Grid.RowSpan="2" Stretch="Fill" Opacity="0" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z ">
                            <Path.Fill>
                                <LinearGradientBrush StartPoint="0,-.15" EndPoint="0,1.75">
                                    <GradientStop Color="#FF84E3FF" Offset="0"/>
                                    <GradientStop Color="#FF6ABFD8" Offset="0.5"/>
                                    <GradientStop Color="#FF5297AB" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>

                        <Path Name="EditingRowGlyph" VerticalAlignment="Center" HorizontalAlignment="Center" Width="6" Height="10"  Margin="8,0,8,0" Grid.RowSpan="2" Stretch="Fill" Opacity="0" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z ">
                            <Path.Fill>
                                <LinearGradientBrush StartPoint="0,-.15" EndPoint="0,1.75">
                                    <GradientStop Color="#FF84E3FF" Offset="0"/>
                                    <GradientStop Color="#FF6ABFD8" Offset="0.5"/>
                                    <GradientStop Color="#FF5297AB" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ThumbableScrollBarStyle-->
    <Style x:Key="ExScrollBar" TargetType="ScrollBar">
        <Setter Property="MinWidth" Value="17"/>
        <Setter Property="MinHeight" Value="17"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ScrollBar">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root" Background="Transparent">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Opacity="0" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundAnimation" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                    <Rectangle Margin="1" x:Name="BackgroundGradient" Opacity="0" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle Margin="1" x:Name="Highlight" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                    <Path Height="8" Width="4" Stretch="Uniform" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FF333333" x:Name="ButtonColor"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Opacity="0" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Opacity="0" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                    <Rectangle x:Name="BackgroundPressed" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                    <Rectangle Margin="1" x:Name="BackgroundGradient" Opacity="0" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle Margin="1" x:Name="Highlight" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                    <Path Height="8" Width="4" Stretch="Uniform" Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FF333333" x:Name="ButtonColor"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Opacity="0" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Opacity="0" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                    <Rectangle x:Name="BackgroundPressed" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                    <Rectangle Margin="1" x:Name="BackgroundGradient" Opacity="0" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle Margin="1" x:Name="Highlight" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                    <Path Height="4" Width="8" Stretch="Uniform" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FF333333" x:Name="ButtonColor"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Opacity="0" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                                <Grid x:Name="Root">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledElement" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value=".7"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Rectangle x:Name="Background" Opacity="0" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2">
                                        <Rectangle.Stroke>
                                            <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                <GradientStop Color="#FF647480" Offset="1"/>
                                                <GradientStop Color="#FFAEB7BF" Offset="0"/>
                                                <GradientStop Color="#FF919EA7" Offset="0.35"/>
                                                <GradientStop Color="#FF7A8A99" Offset="0.35"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Stroke>
                                    </Rectangle>
                                    <Rectangle x:Name="BackgroundMouseOver" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                    <Rectangle x:Name="BackgroundPressed" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                    <Rectangle Margin="1" x:Name="BackgroundGradient" Opacity="0" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                        <Rectangle.Fill>
                                            <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Rectangle.Fill>
                                    </Rectangle>
                                    <Rectangle Margin="1" x:Name="Highlight" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                    <Path Height="4" Width="8" Stretch="Uniform" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z ">
                                        <Path.Fill>
                                            <SolidColorBrush Color="#FF333333" x:Name="ButtonColor"/>
                                        </Path.Fill>
                                    </Path>
                                    <Rectangle x:Name="DisabledElement" Opacity="0" Fill="#FFFFFFFF" RadiusX="2" RadiusY="2"/>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid Margin="1,0,1,0" x:Name="ThumbVisual">
                                        <Rectangle x:Name="Background" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2">
                                            <Rectangle.Stroke>
                                                <LinearGradientBrush EndPoint="1,.5" StartPoint="0,.5">
                                                    <GradientStop Color="#FF818F99" Offset="1"/>
                                                    <GradientStop Color="#FFC2C9CE" Offset="0"/>
                                                    <GradientStop Color="#FFB3BBC1" Offset="0.35"/>
                                                    <GradientStop Color="#FF96A4B1" Offset="0.35"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                        </Rectangle>
                                        <Rectangle x:Name="BackgroundMouseOver" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                        <Rectangle x:Name="BackgroundPressed" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                        <Rectangle Margin="1" x:Name="BackgroundGradient" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                            <Rectangle.Fill>
                                                <LinearGradientBrush EndPoint="1,.7" StartPoint="0,.7">
                                                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                    <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                    <GradientStop Color="#E5FFFFFF" Offset="0.6"/>
                                                    <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                        <Rectangle Margin="1" x:Name="Highlight" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                                <Grid>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualState x:Name="Normal"/>
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundMouseOver" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#7FFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#CCFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F2FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#6BFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#C6FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#EAFFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                        <SplineColorKeyFrame KeyTime="0" Value="#F4FFFFFF"/>
                                                    </ColorAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                        <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid Margin="0,1,0,1" x:Name="ThumbVisual">
                                        <Rectangle x:Name="Background" Fill="#FF1F3B53" StrokeThickness="1" RadiusX="2" RadiusY="2">
                                            <Rectangle.Stroke>
                                                <LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
                                                    <GradientStop Color="#FF818F99" Offset="1"/>
                                                    <GradientStop Color="#FFC2C9CE" Offset="0"/>
                                                    <GradientStop Color="#FFB3BBC1" Offset="0.35"/>
                                                    <GradientStop Color="#FF96A4B1" Offset="0.35"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Stroke>
                                        </Rectangle>
                                        <Rectangle x:Name="BackgroundMouseOver" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                        <Rectangle x:Name="BackgroundPressed" Opacity="0" Fill="#FF448DCA" Stroke="#00000000" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                        <Rectangle Margin="1" x:Name="BackgroundGradient" Stroke="#FFFFFFFF" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                            <Rectangle.Fill>
                                                <LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
                                                    <GradientStop Color="#FFFFFFFF" Offset="0.013"/>
                                                    <GradientStop Color="#F9FFFFFF" Offset="0.375"/>
                                                    <GradientStop Color="#E5FFFFFF" Offset="0.603"/>
                                                    <GradientStop Color="#C6FFFFFF" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                        <Rectangle Margin="1" x:Name="Highlight" IsHitTestVisible="false" Opacity="0" Stroke="#FF6DBDD1" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                    </Grid>
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="HorizontalRoot">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle Grid.ColumnSpan="5" Stroke="#00000000" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
                                        <GradientStop Color="#FFF4F6F7" Offset="0"/>
                                        <GradientStop Color="#FFF0F4F7" Offset="0.344"/>
                                        <GradientStop Color="#FFDFE3E6" Offset="1"/>
                                        <GradientStop Color="#FFE9EEF4" Offset="0.527"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle Grid.ColumnSpan="5" Fill="{TemplateBinding Background}" Stroke="#00000000" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                            <Rectangle Opacity=".375" Grid.ColumnSpan="5" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                        <GradientStop Color="#FF718597" Offset="0.375"/>
                                        <GradientStop Color="#FF617584" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <Rectangle Margin="1" Grid.ColumnSpan="5" RadiusX="1" RadiusY="1">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="0.5,.125" StartPoint=".5,.875">
                                        <GradientStop Color="#33FFFFFF"/>
                                        <GradientStop Color="#99FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <RepeatButton Margin="1" x:Name="HorizontalSmallDecrease" Width="16" IsTabStop="False" Template="{StaticResource HorizontalDecrementTemplate}" Grid.Column="0" Interval="50"/>
                            <RepeatButton x:Name="HorizontalLargeDecrease" Width="0" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="1" Interval="50"/>
                            <Thumb MinWidth="18" x:Name="HorizontalThumb" Width="18" Background="{TemplateBinding Background}" Template="{StaticResource HorizontalThumbTemplate}" Grid.Column="2"/>
                            <RepeatButton x:Name="HorizontalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="3" Interval="50"/>
                            <RepeatButton Margin="1" x:Name="HorizontalSmallIncrease" Width="16" IsTabStop="False" Template="{StaticResource HorizontalIncrementTemplate}" Grid.Column="4" Interval="50"/>
                        </Grid>
                        <Grid x:Name="VerticalRoot" Visibility="Collapsed">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Rectangle Grid.RowSpan="5" Stroke="#00000000" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush EndPoint="0,0.5" StartPoint="1,0.5">
                                        <GradientStop Color="#FFF4F6F7" Offset="0"/>
                                        <GradientStop Color="#FFF0F4F7" Offset="0.344"/>
                                        <GradientStop Color="#FFDFE3E6" Offset="1"/>
                                        <GradientStop Color="#FFE9EEF4" Offset="0.527"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <Rectangle Opacity=".375" Grid.RowSpan="5" StrokeThickness="1" RadiusX="1" RadiusY="1">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFA3AEB9" Offset="0"/>
                                        <GradientStop Color="#FF8399A9" Offset="0.375"/>
                                        <GradientStop Color="#FF718597" Offset="0.375"/>
                                        <GradientStop Color="#FF617584" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <Rectangle Margin="1" Grid.RowSpan="5" RadiusX="1" RadiusY="1">
                                <Rectangle.Stroke>
                                    <LinearGradientBrush EndPoint="0.125,0.5" StartPoint="0.875,0.5">
                                        <GradientStop Color="#33FFFFFF"/>
                                        <GradientStop Color="#99FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Stroke>
                            </Rectangle>
                            <!--Add EventHandler for Loaded Event-->

                            <RepeatButton Height="16" Margin="1" x:Name="VerticalSmallDecrease" IsTabStop="False" Template="{StaticResource VerticalDecrementTemplate}" Grid.Row="0" Interval="50" Cursor="hand"/>
                            <RepeatButton Height="0" x:Name="VerticalLargeDecrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="1" Interval="50"/>
                            <Thumb Height="18" MinHeight="18" x:Name="VerticalThumb" Template="{StaticResource VerticalThumbTemplate}" Grid.Row="2" Cursor="hand"/>
                            <TextBlock x:Name="pageInfo" IsHitTestVisible="False" Text="" Opacity="0.7" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                            <RepeatButton x:Name="VerticalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="3" Interval="50"/>
                            <RepeatButton Height="16" Margin="1" x:Name="VerticalSmallIncrease" IsTabStop="False" Template="{StaticResource VerticalIncrementTemplate}" Grid.Row="4" Interval="50" Cursor="hand"/>
                            <local:ExScrollBarBlock/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ExScrollBar">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ExScrollBar">
                    <Grid>
                        <ScrollBar x:Name="scrollBar" Style="{StaticResource ExScrollBar}" Orientation="Vertical"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--  ExDataGrid Ending  -->

</ResourceDictionary>


